package com.zmc.admin.infrastructure.dao;

import com.zmc.admin.infrastructure.entity.SysMenuEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmc.admin.infrastructure.bean.query.SysMenuQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 菜单权限表
 * 
 * @author zmc
 * @email 
 * @date 2024-10-09 17:27:49
 */
@Mapper
public interface SysMenuDao extends BaseMapper<SysMenuEntity> {

    Set<String> selectMenuPermsByUserId(@Param("userId")Long userId);

    List<SysMenuEntity> selectMenuTreeByUserId(@Param("userId")Long userId);

    List<SysMenuEntity> selectMenuList(SysMenuQuery query);

    List<SysMenuEntity> selectMenuListByUserId(SysMenuQuery query);

    SysMenuEntity checkMenuNameUnique(@Param("menuName") String menuName,@Param("parentId") Long parentId);

    int hasChildByMenuId(@Param("menuId")Long menuId);

    List<Long> selectMenuListByRoleId(@Param("roleId")Long roleId,@Param("menuCheckStrictly") Integer menuCheckStrictly);
    
}
